﻿﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace WebApplication1.DDD.Web.Default.Common.VCode
{
    public class VCheckAction  : Controller
	{
		public VCheckAction(System.IO.TextWriter tw):base(tw){}
		public VCheckAction(string fileName) : base(fileName) {}
		#if (!AspNET && !MicrosoftOwin && !NFinalOwin)
		public VCheckAction(HttpContext context):base(context){}
		public VCheckAction(Microsoft.Owin.IOwinContext context):base(context){}
		public VCheckAction(NFinal.Owin.HtmlWriter writer,NFinal.Owin.Request request):base(writer,request){}
		#endif
		#if AspNET
		public VCheckAction(HttpContext context):base(context){}
		#endif
		#if MicrosoftOwin
		public VCheckAction(Microsoft.Owin.IOwinContext context):base(context){}
		#endif
		#if NFinalOwin
		public VCheckAction(NFinal.Owin.HtmlWriter writer,NFinal.Owin.Request request):base(writer,request){}
		#endif
		public VCheckAction(Controller controller):base(controller){}
        
        public void VCheck(string vcode)
        {
            NFinal.Lib.VerifyCode verifyCode = new NFinal.Lib.VerifyCode();
            bool result= verifyCode.Check(Cookie.vcheck, vcode);
            this.AjaxReturn(result);
        }
    }
}